import {get,post} from "./http"

//===========================歌手相关===================================

//判断管理员是否登录成功
export const getLoginStatus = (params) => post(`/admin/login/status`,params);

//添加歌手
export const setSinger = (params) => post(`/singer/add`,params);

//查询歌手
export const getAllSinger = () => get(`/singer/allSinger`);

//编辑歌手
export const updateSinger = (params) => post(`/singer/update`,params);

//删除歌手
export const delSinger = (id) => get(`/singer/delete?id=${id}`);


//===========================歌曲相关===================================

//根据歌手id查询歌曲
export const songOfSingerId = (singer_id) => get(`/song/singer/detail?singer_id=${singer_id}`);

//编辑歌曲
export const updateSong = (params) => post(`/song/update`,params);

//删除歌手
export const delSong = (id) => get(`/song/delete?id=${id}`);

//根据歌曲id查询歌曲
export const songOfSongId = (id) => get(`/song/detail?songId=${id}`);

//根据歌曲名获取歌曲对象
export const songOfSongName = (songName) => get(`/song/detail?songName=${songName}`);

//===========================歌单相关===================================

//添加歌单
export const setSongList = (params) => post(`/songList/add`,params);

//查询歌单
export const getAllSongList = () => get(`/songList/allSongList`);

//编辑歌单
export const updateSongList = (params) => post(`/songList/update`,params);

//删除歌单
export const delSongList = (id) => get(`/songList/delete?id=${id}`);

//===========================歌单的歌曲相关===================================

//根据歌单id查询歌曲列表
export const listSongDetail = (song_list_id) => get(`/listSong/detail?song_list_id=${song_list_id}`);

//===========================用户相关===================================

//获取所有用户
export const getAllConsumer = () => get(`/user/allUser`);

//添加用户
export const setConsumer = (params) => post(`/user/add`,params);

//编辑用户
export const updateConsumer = (params) => post(`/user/update`,params);

//删除用户
export const delConsumer = (id) => get(`/user/delete?id=${id}`);

//===========================获取数量===================================

//用户数量
export const consumerCount = () => get(`/user/consumerCount`);

//歌单数量
export const songListCount = () => get(`/songList/songListCount`);

//歌手数量
export const singerCount = () => get(`/singer/singerCount`);

//歌曲数量
export const songCount = () => get(`/song/songCount`);

//性别男数量
export const consumerBoyCount = () => get(`/user/consumerBoyCount`);
//性别女数量
export const consumerGirlCount = () => get(`/user/consumerGirlCount`);
//性别保密数量
export const consumerDogCount = () => get(`/user/consumerDogCount`);



